package me.qi.kancha.service;

import me.qi.kancha.dto.core.RoleDTO;
import me.qi.kancha.service.base.BaseService;
import me.qi.kancha.vo.role.RoleGrantVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author kobe
* @description 针对表【role】的数据库操作Service
* @createDate 2022-01-06 14:51:48
*/
public interface RoleService extends BaseService<RoleDTO> {

    /**
     * 授权
     * @param param
     * @return
     */
    boolean grant(RoleGrantVo param);

    /**
     * 角色权限编号
     * @param code
     * @return
     */
    List<String> ruleCodes(String code);

    /**
     * 删除角色
     *
     * @param code
     */
    @Transactional
    void delete(String code);
}
